home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / CFUNCTS.LZH / CARD.C next >
Text File  |  1986-12-30  |  515b  |  14 lines

  1. #include <dos.h>
  2. int card()         /* determine type of card. (Color or Monochrome)    */
  3. {
  4. struct { int ax,bx,cx,dx,si,di,ds,es; } sreg;
  5. int axreg;
  6.  
  7.              int86(0x0011,&sreg,&sreg);   /* Interrupt 11x             */
  8.  
  9.              axreg = (sreg.ax & 0x0030);  /* Test for color card.      */
  10.              if (axreg == 0x0030)
  11.                return(0);                 /* Color Card.               */
  12.              else
  13.                return(1);                 /* Monochrome Card.          */
  14. }